package jp.eisbahn.mgapi.api;

/**
 * This is the response class which can have the paging information.
 * @author Yoichiro Tanaka
 *
 */
public abstract class PagingResponse extends Response {

    /** Start index. */
    private long startIndex;

    /** Total results. */
    private long totalResults;

    /** Items per page. */
    private long itemsPerPage;

    /**
     * Retrieve the start index value.
     * @return The start index.
     */
    public final long getStartIndex() {
        return startIndex;
    }

    /**
     * Retrieve the total result size.
     * @return The total result size.
     */
    public final long getTotalResults() {
        return totalResults;
    }

    /**
     * Retrieve the item size per page.
     * @return The item site per page.
     */
    public final long getItemsPerPage() {
        return itemsPerPage;
    }

    /**
     * Set the start index value.
     * @param newStartIndex The start index.
     */
    protected final void setStartIndex(final long newStartIndex) {
        startIndex = newStartIndex;
    }

    /**
     * Set the total result size.
     * @param newTotalResults The total result size.
     */
    protected final void setTotalResults(final long newTotalResults) {
        totalResults = newTotalResults;
    }

    /**
     * Set the item size per page.
     * @param newItemsPerPage The item size per page.
     */
    protected final void setItemsPerPage(final long newItemsPerPage) {
        itemsPerPage = newItemsPerPage;
    }

}
